﻿using System.Security.Cryptography.X509Certificates;

namespace DoNet.ApiHttpClient.Certificate
{
    /// <summary>
    /// 
    /// </summary>
    public interface ICertificateLoader
    {
        /// <summary>
        /// 加载证书
        /// 信支付API证书的名称为商户号，密码也是商户号
        /// </summary>
        /// <param name="basePath">证书文件目录</param>
        /// <param name="certId">证书对应的主体，如微信商户号</param>
        /// <param name="certId">证书名称</param>
        /// <param name="fileExt">证书后缀名，p12、pfx；pem、crt、cer；der</param>
        /// <returns></returns>
        /// <exception cref="FileNotFoundException"></exception>
        X509Certificate2 LoadCertificate(string basePath, string certId, string certName = "apiclient_cert", string fileExt = "p12");
    }
}
